<?php

/**
 * Prado Portal.
 *
 * @author Steen Rabol <steen.rabol@gmail.com>
 * @link http://www.pradoportal.dk/
 * @copyright Copyright &copy; 2006,2007,2008 Steen Rabol
 * @license http://www.pradoportal.dk
 * @version $Id: TPortalHyperLink.php 464 2011-01-21 17:47:17Z steen.rabol $
 *
 */

Prado::using('System.Web.UI.WebControls.THyperLink');

class TPortalHyperLink extends THyperLink
{
	public function getImageWidth()
	{
		return $this->getViewState('ImageWidth','');
	}

	public function setImageWidth($value)
	{
		$this->setViewState('ImageWidth',$value,'');
	}

	public function getImageHeight()
	{
		return $this->getViewState('ImageHeight','');
	}

	public function setImageHeight($value)
	{
		$this->setViewState('ImageHeight',$value,'');
	}

	protected function createImage($imageUrl)
	{
		$image=Prado::createComponent('System.Web.UI.WebControls.TImage');
		$image->setImageUrl($imageUrl);
		if(($toolTip=$this->getToolTip())!=='')
			$image->setToolTip($toolTip);
		if(($text=$this->getText())!=='')
			$image->setAlternateText($text);
		$image->setBorderWidth('0');

		if($this->getImageHeight() != '')
			$image->Height	= $this->getImageHeight();

		if($this->getImageWidth() != '')
			$image->Width= $this->getImageWidth();
		return $image;
	}

}
?>
